def find_absent_students(N, M, reports):
    # Step 1: Create a set to store present student IDs
    present_students = set()

    # Step 2: Add reported IDs to the set
    for report in reports:
        present_students.add(report)

    # Step 3: Find absent students
    absent_students = [i for i in range(1, N+1) if i not in present_students]

    # Step 4: Return the result
    return absent_students if absent_students else [0]

# Input reading
N, M = map(int, input().split())
reports = list(map(int, input().split()))

# Function call and output
result = find_absent_students(N, M, reports)
print(" ".join(map(str, result)))
